package com.multithreading.chart2.lock;

/**
 * @author chenqb
 * @project_name: concurrent_programming
 * @package_name: com.cqb.lock
 * @ClassName: ReentrantLocking
 * @description: 可重入锁
 * Author by cqb, Date on 2020/8/2，8:05
 * PS: Not easy to write code, please indicate.
 */
public class ReentrantLocking {
    public static void main(String[] args) {
        HelloB();
    }

    public static synchronized void HelloA(){
        System.out.println("hello A");
    }public static synchronized void HelloB(){
        System.out.println("hello B");
        HelloA();
    }
}
